package MAIN;

import java.util.Scanner;
import java.util.*;
public class Main3 {
    //把字符串转换成数组
    public static int strToInt(String str) {
        for (int i = 0; i < str.length(); i++) {
            char ch = str.charAt(i);
            if (i == 0 && ch != '+' || ch != '-') {
                System.out.println(0);
            } else if (ch >= 'a' || ch <= 'z') {
                System.out.println(0);
            }
            StringBuilder sb1 = new StringBuilder(str);
        }
        return 0;
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {// 注意，如果输入是多个测试用例，请通过while循环处理多个测试用例
            String a = in.next();
            int num = strToInt(a);
            System.out.println(num);
        }
    }
    public static int noFindTwo(int x,int y) {
        //输入两个整数坐标，经过以下公式计算，不能等于2.
        int[] arr1 = new int[x];
        int[] arr2 = new int[y];
        //代表有多少行格子  x
        for (int i = 0; i < x; i++) {
            arr1[i] = i;
        }
        //代表有多少列格子   y
        for (int i = 0; i < y; i++) {
            arr2[i] = i;
        }
        int count = 0;
        for (int i = 0; i < x-1; i++) {
            for (int j = 0; j < y-1; j++) {
                if (((arr1[i]-arr1[i+1])^2 + (arr2[j]-arr2[j+1])^2) != 2) {
                    count++;
                }
            }
        }
        return count;
    }
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {// 注意，如果输入是多个测试用例，请通过while循环处理多个测试用例
            int a = in.nextInt();
            int b = in.nextInt();
            int count = noFindTwo(a,b);
            System.out.println(count);
        }
    }
}
